﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebServiceConfiguration.aspx.cs" Inherits="CRMWeb.Pages.Configuration.WebServiceConfiguration" ValidateRequest="false" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        <div>
            <asp:Table ID="tblConfigurtion" runat="server">
                <asp:TableRow>
                    <asp:TableCell>Service Name: </asp:TableCell>
                    <asp:TableCell>
                        <asp:TextBox ID="txtServiceName" runat="server" />
                    </asp:TableCell>
                </asp:TableRow>
                <asp:TableRow>
                    <asp:TableCell>Service URL: </asp:TableCell><asp:TableCell>
                        <asp:TextBox ID="txtServiceURL" runat="server" />
                    </asp:TableCell>
                </asp:TableRow>
                <asp:TableRow>
                    <asp:TableCell>Service XML: </asp:TableCell><asp:TableCell>
                        <asp:TextBox ID="txtServiceXML" TextMode="MultiLine" runat="server" Rows="15" Columns="100" />
                    </asp:TableCell>
                </asp:TableRow>
                <asp:TableRow>
                    <asp:TableCell>
                        <asp:Button ID="btnSaveWebService" runat="server" Text="Save" OnClick="btnSaveWebService_Click" />
                    </asp:TableCell>
                </asp:TableRow>
            </asp:Table>
        </div>
        <br />
        <br />
        <asp:GridView ID="grdConfigurationParameter" runat="server"
            AutoGenerateColumns="False" DataKeyNames="ParameterID"
            OnRowCancelingEdit="grdConfigurationParameter_RowCancelingEdit"
            OnRowDataBound="grdConfigurationParameter_RowDataBound"
            OnRowEditing="grdConfigurationParameter_RowEditing"
            OnRowUpdating="grdConfigurationParameter_RowUpdating" ShowFooter="True"
            OnRowCommand="grdConfigurationParameter_RowCommand"
            OnRowDeleting="grdConfigurationParameter_RowDeleting">
            <Columns>
                <asp:TemplateField HeaderText="Parameter Name" HeaderStyle-HorizontalAlign="Left">
                    <EditItemTemplate>
                        <asp:TextBox ID="txtUpdateParameterName" runat="server" Text='<%# Bind("ParameterName") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <FooterTemplate>
                        <asp:TextBox ID="txtNewParameterName" runat="server"></asp:TextBox>
                    </FooterTemplate>
                    <ItemTemplate>
                        <asp:Label ID="lblParameterName" runat="server" Text='<%# Bind("ParameterName") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Parameter Replace String" HeaderStyle-HorizontalAlign="Left">
                    <EditItemTemplate>
                        <asp:TextBox ID="txtUpdateParameterReplaceString" runat="server" Text='<%# Bind("ParameterReplaceString") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <FooterTemplate>
                        <asp:TextBox ID="txtNewParameterReplaceString" runat="server"></asp:TextBox>
                    </FooterTemplate>
                    <ItemTemplate>
                        <asp:Label ID="lblParameterReplaceString" runat="server" Text='<%# Bind("ParameterReplaceString") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Parameter Value" HeaderStyle-HorizontalAlign="Left">
                    <EditItemTemplate>
                        <asp:TextBox ID="txtUpdateParameterValue" runat="server" Text='<%# Bind("ParameterValue") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <FooterTemplate>
                        <asp:TextBox ID="txtNewParameterValue" runat="server"></asp:TextBox>
                    </FooterTemplate>
                    <ItemTemplate>
                        <asp:Label ID="lblParameterValue" runat="server" Text='<%# Bind("ParameterValue") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Dynamic" HeaderStyle-HorizontalAlign="Left">
                    <EditItemTemplate>
                        <asp:CheckBox ID="chkUpdateIsDynamic" runat="server" Checked='<%#Eval("IsDynamic").ToString().Equals("0") ? false : true %>'></asp:CheckBox>
                    </EditItemTemplate>
                    <FooterTemplate>
                        <asp:CheckBox ID="chkNewIsDynamic" runat="server"></asp:CheckBox>
                    </FooterTemplate>
                    <ItemTemplate>
                        <asp:CheckBox ID="chkIsDynamic" Enabled="false" runat="server" Checked='<%#Eval("IsDynamic").ToString().Equals("0") ? false : true %>'></asp:CheckBox>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="" ShowHeader="False" HeaderStyle-HorizontalAlign="Left">
                    <EditItemTemplate>
                        <asp:LinkButton ID="lnkUpdate" runat="server" CausesValidation="True" CommandName="Update" Text="Update"></asp:LinkButton><asp:LinkButton ID="lnkCancel" runat="server" CausesValidation="False" CommandName="Cancel" Text="Cancel"></asp:LinkButton>
                    </EditItemTemplate>
                    <FooterTemplate>
                        <asp:LinkButton ID="lnkAdd" runat="server" CausesValidation="False" CommandName="Insert" Text="Insert"></asp:LinkButton>
                    </FooterTemplate>
                    <ItemTemplate>
                        <asp:LinkButton ID="lnkEdit" runat="server" CausesValidation="False" CommandName="Edit" Text="Edit"></asp:LinkButton>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:CommandField HeaderText="Delete" ShowDeleteButton="True" ShowHeader="True" />
            </Columns>
        </asp:GridView>
    </form>
</body>
</html>
